<template>
  <div class="hd">
    <input type="text" v-model="inputValue">
    <button @click="add">添加</button>
  </div>
  <Child :msg="data" />
</template>

<script setup>
import Child from './child.vue'
import { ref } from 'vue'


const inputValue = ref('')
const data = ref('')

const add = () => {
  data.value = inputValue.value
  inputValue.value = ''
}

</script>

<style lang="css" scoped>

</style>